nums = [3,2,4]
target = 6

# print(nums[2:])
nums = [1]
from functools import reduce
# print(str(reduce(lambda x, y: x*10+y, digits)+1))
# print(list(map(int, str(reduce(lambda x, y: x*10+y, digits)+1))))

nums1 = [1,2,3,0,0,0]
nums2 = [2,5,6]
m = 3
n = 3
a = nums1[0:m]
for i in range(0, m+n):
    if len(a) == 0:
        for j in range(0, len(nums2)):
            nums1[i+j] = nums2[j]
        break
    elif len(nums2) == 0:
        for j in range(0, len(a)):
            nums1[i+j] = a[j]
        break
    elif a[0] <= nums2[0]:
        nums1[i] = a.pop(0)
    else:
        nums1[i] = nums2.pop(0)

print(nums1)




